<?php
namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\WithMapping;

class MappExport implements FromQuery, WithMapping
{
    /**
     * @var Invoice $invoice
     */
    public function map($invoice): array
    {
        return [
            $invoice->address,
            $invoice->order_sn,
            Date::dateTimeToExcel($invoice->created_at),
        ];
    }
}